package com.acme.task1;

public class Calculator {
	public static void main(String[] args) 
	{
		if (args.length == 3)
		{		
			double operand1 = Double.parseDouble(args[0]);
			double operand2 = Double.parseDouble(args[2]);
		
			//switch (string[0])
			switch (args[1].charAt(0))
			{
			case '+':
				System.out.println(operand1 + operand2);
				break;
			case '-':
				System.out.println(operand1 - operand2);
				break;
			case '*':
				System.out.println(operand1 * operand2);
				break;
			case '/':
				if (operand2 != 0)
				{
					System.out.println(operand1 / operand2);
				}
				else
				{
					System.out.println("Division by zero!");
				}
				break;
			default:
				System.out.println("Operation not specified");
			}
		}
		else
		{
			System.out.println("Incorrect number of arguments");
		}
	}
}